Within the Franck-Condon approximation, the single ionization of H$_2$ leaves H$_2^+$ in a coherent superposition of 19 nuclear vibrational states. We numerically design an optimal laser pulse train to transfer such a coherent nuclear wave packet to the ground vibrational state of H$_2^+$. The simulation results show that the population of the ground state after the transfer is more than 91%. Frequency analysis of the designed optimal pulse reveals that the transfer principle is mainly an anti-Stokes transition, i.e., the H$_2^+$ in $1s\sigma_g$ with excited nuclear vibrational states is first pumped to $2p\sigma_g$ state by the pulse at an appropriate time, and then dumped back to $1s\sigma_g$ with lower excited or ground vibrational states.